package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZzCustomerInfoMapper;
import com.ruoyi.system.domain.ZzCustomerInfo;
import com.ruoyi.system.service.IZzCustomerInfoService;

/**
 * 客户资料Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-27
 */
@Service
public class ZzCustomerInfoServiceImpl implements IZzCustomerInfoService 
{
    @Autowired
    private ZzCustomerInfoMapper zzCustomerInfoMapper;

    /**
     * 查询客户资料
     * 
     * @param id 客户资料主键
     * @return 客户资料
     */
    @Override
    public ZzCustomerInfo selectZzCustomerInfoById(Long id)
    {
        return zzCustomerInfoMapper.selectZzCustomerInfoById(id);
    }

    /**
     * 查询客户资料列表
     * 
     * @param zzCustomerInfo 客户资料
     * @return 客户资料
     */
    @Override
    public List<ZzCustomerInfo> selectZzCustomerInfoList(ZzCustomerInfo zzCustomerInfo)
    {
        return zzCustomerInfoMapper.selectZzCustomerInfoList(zzCustomerInfo);
    }

    /**
     * 新增客户资料
     * 
     * @param zzCustomerInfo 客户资料
     * @return 结果
     */
    @Override
    public int insertZzCustomerInfo(ZzCustomerInfo zzCustomerInfo)
    {
        zzCustomerInfo.setCreateTime(DateUtils.getNowDate());
        return zzCustomerInfoMapper.insertZzCustomerInfo(zzCustomerInfo);
    }

    /**
     * 修改客户资料
     * 
     * @param zzCustomerInfo 客户资料
     * @return 结果
     */
    @Override
    public int updateZzCustomerInfo(ZzCustomerInfo zzCustomerInfo)
    {
        zzCustomerInfo.setUpdateTime(DateUtils.getNowDate());
        return zzCustomerInfoMapper.updateZzCustomerInfo(zzCustomerInfo);
    }

    /**
     * 批量删除客户资料
     * 
     * @param ids 需要删除的客户资料主键
     * @return 结果
     */
    @Override
    public int deleteZzCustomerInfoByIds(Long[] ids)
    {
        return zzCustomerInfoMapper.deleteZzCustomerInfoByIds(ids);
    }

    /**
     * 删除客户资料信息
     * 
     * @param id 客户资料主键
     * @return 结果
     */
    @Override
    public int deleteZzCustomerInfoById(Long id)
    {
        return zzCustomerInfoMapper.deleteZzCustomerInfoById(id);
    }
}
